package info.grid.despierto.db;

import java.io.Serializable;

/**
 * 1レコードのデータを保持するオブジェクト
 * Intentに詰めてやり取りするのでSerializableをimplementsする
 */
@SuppressWarnings("serial")
public class GroupTable implements Serializable{
	// テーブル名
	public static final String TABLE_NAME = "t_group";

	// カラム名
	public static final String COLUMN_ID = "_id";
	public static final String COLUMN_GROUP_NAME = "group_name";
	public static final String COLUMN_GROUP_ONOFF = "group_onoff";
	public static final String COLUMN_REPEAT_EVERYDAY = "repeat_everyday";
	public static final String COLUMN_REPEAT_SUN = "repeat_sun";
	public static final String COLUMN_REPEAT_MON = "repeat_mon";
	public static final String COLUMN_REPEAT_TUE = "repeat_tue";
	public static final String COLUMN_REPEAT_WED = "repeat_wed";
	public static final String COLUMN_REPEAT_THU = "repeat_thu";
	public static final String COLUMN_REPEAT_FRI = "repeat_fri";
	public static final String COLUMN_REPEAT_SAT = "repeat_sat";


	// プロパティ
	private Long rowid = null;
	private String groupName = null;
	private Integer groupOnoff = null;
	private Integer repeatEveryday = null;
	private Integer repeatSun = null;
	private Integer repeatMon = null;
	private Integer repeatTue = null;
	private Integer repeatWed = null;
	private Integer repeatThu = null;
	private Integer repeatFri = null;
	private Integer repeatSat = null;


	public Long getRowid() {
		return rowid;
	}

	public void setRowid(Long rowid) {
		this.rowid = rowid;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public Integer getGroupOnoff() {
		return groupOnoff;
	}

	public void setGroupOnoff(Integer groupOnoff) {
		this.groupOnoff = groupOnoff;
	}

	public Integer getRepeatSun() {
		return repeatSun;
	}

	public void setRepeatSun(Integer repeatSun) {
		this.repeatSun = repeatSun;
	}

	public Integer getRepeatMon() {
		return repeatMon;
	}

	public void setRepeatMon(Integer repeatMon) {
		this.repeatMon = repeatMon;
	}

	public Integer getRepeatTue() {
		return repeatTue;
	}

	public void setRepeatTue(Integer repeatTue) {
		this.repeatTue = repeatTue;
	}

	public Integer getRepeatWed() {
		return repeatWed;
	}

	public void setRepeatWed(Integer repeatWed) {
		this.repeatWed = repeatWed;
	}

	public Integer getRepeatThu() {
		return repeatThu;
	}

	public void setRepeatThu(Integer repeatThu) {
		this.repeatThu = repeatThu;
	}

	public Integer getRepeatFri() {
		return repeatFri;
	}

	public void setRepeatFri(Integer repeatFri) {
		this.repeatFri = repeatFri;
	}

	public Integer getRepeatSat() {
		return repeatSat;
	}

	public void setRepeatSat(Integer repeatSat) {
		this.repeatSat = repeatSat;
	}

	public Integer getRepeatEveryday() {
		return repeatEveryday;
	}

	public void setRepeatEveryday(Integer repeatEveryday) {
		this.repeatEveryday = repeatEveryday;
	}

	public boolean getGroupOnoffView() {
		if(groupOnoff == 0){
			return false;
		}else{
			return true;
		}
	}

	public String getRepeatSunView() {
		if(repeatSun == 0){
			return "";
		}else{
			return "Sun";
		}
	}

	public String getRepeatMonView() {
		if(repeatMon == 0){
			return "";
		}else{
			return "Mon";
		}
	}

	public String getRepeatTueView() {
		if(repeatTue == 0){
			return "";
		}else{
			return "Tue";
		}
	}

	public String getRepeatWedView() {
		if(repeatWed == 0){
			return "";
		}else{
			return "Wed";
		}
	}

	public String getRepeatThuView() {
		if(repeatThu == 0){
			return "";
		}else{
			return "Thu";
		}
	}

	public String getRepeatFriView() {
		if(repeatFri == 0){
			return "";
		}else{
			return "Fri";
		}
	}

	public String getRepeatSatView() {
		if(repeatSat == 0){
			return "";
		}else{
			return "Sat";
		}
	}

	public String getRepeatEverydayView() {
		if(repeatEveryday == 0){
			return "";
		}else{
			return "Eve";
		}
	}

	public boolean isRepeatSun() {
		if(repeatSun == 0){
			return false;
		}else{
			return true;
		}
	}

	public boolean isRepeatMon() {
		if(repeatMon == 0){
			return false;
		}else{
			return true;
		}
	}

	public boolean isRepeatTue() {
		if(repeatTue == 0){
			return false;
		}else{
			return true;
		}
	}

	public boolean isRepeatWed() {
		if(repeatWed == 0){
			return false;
		}else{
			return true;
		}
	}

	public boolean isRepeatThu() {
		if(repeatThu == 0){
			return false;
		}else{
			return true;
		}
	}

	public boolean isRepeatFri() {
		if(repeatFri == 0){
			return false;
		}else{
			return true;
		}
	}

	public boolean isRepeatSat() {
		if(repeatSat == 0){
			return false;
		}else{
			return true;
		}
	}

	public boolean isRepeatEveryday() {
		if(repeatEveryday == 0){
			return false;
		}else{
			return true;
		}
	}

	public void setRepeatSun(boolean repeatSun) {
		if(repeatSun){
			this.repeatSun = 1;
		}else{
			this.repeatSun = 0;
		}
	}

	public void setRepeatMon(boolean repeatMon) {
		if(repeatMon){
			this.repeatMon = 1;
		}else{
			this.repeatMon = 0;
		}
	}

	public void setRepeatTue(boolean repeatTue) {
		if(repeatTue){
			this.repeatTue = 1;
		}else{
			this.repeatTue = 0;
		}
	}

	public void setRepeatWed(boolean repeatWed) {
		if(repeatWed){
			this.repeatWed = 1;
		}else{
			this.repeatWed = 0;
		}
	}

	public void setRepeatThu(boolean repeatThu) {
		if(repeatThu){
			this.repeatThu = 1;
		}else{
			this.repeatThu = 0;
		}
	}

	public void setRepeatFri(boolean repeatFri) {
		if(repeatFri){
			this.repeatFri = 1;
		}else{
			this.repeatFri = 0;
		}
	}

	public void setRepeatSat(boolean repeatSat) {
		if(repeatSat){
			this.repeatSat = 1;
		}else{
			this.repeatSat = 0;
		}
	}

	public void setRepeatEveryday(boolean repeatEveryday) {
		if(repeatEveryday){
			this.repeatEveryday = 1;
		}else{
			this.repeatEveryday = 0;
		}
	}

}
